From rummler at evolvica.org Tue Dec 2 10:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue Dec 2 21:27:13 2003 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler@evolvica.org || | \ + + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 09:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Dec 3 09:23:12 2003 Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 15:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed Dec 3 14:33:08 2003 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request@linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler@acm.org || | \ + + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Thu Dec 4 00:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu Dec 4 00:37:16 2003 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request@linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 11:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat Dec 13 11:50:45 2003 Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj@www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 13:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun Dec 14 18:18:51 2003 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 19:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun Dec 14 19:07:56 2003 Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 13:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon Dec 15 18:17:24 2003 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 20:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon Dec 15 20:24:46 2003 Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 15:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon Dec 15 20:52:16 2003 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Tue Dec 16 01:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Dec 16 01:03:58 2003 Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 08:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue Dec 16 13:25:21 2003 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Thu Dec 18 05:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Tue Dec 16 13:54:31 2003 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 14:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Dec 16 14:21:57 2003 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 17:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed Dec 17 14:57:36 2003 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 17:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed Dec 17 15:22:58 2003 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 10:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed Dec 17 15:24:24 2003 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 17:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed Dec 17 15:43:35 2003 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 11:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed Dec 17 16:07:35 2003 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 16:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Dec 17 16:47:50 2003 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj@www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 13:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu Dec 18 12:17:31 2003 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 14:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Dec 18 14:21:16 2003 Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 15:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu Dec 18 15:14:52 2003 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 16:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri Dec 19 14:15:14 2003 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment.htm From taj at www.linux.org.uk Fri Dec 19 15:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Dec 19 15:01:34 2003 Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 15:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Dec 19 15:08:19 2003 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 17:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Sat Dec 20 01:36:28 2003 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Sat Dec 20 02:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat Dec 20 02:08:11 2003 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 18:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat Dec 20 18:49:40 2003 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 19:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat Dec 20 19:32:46 2003 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 08:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon Dec 22 16:12:36 2003 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 16:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon Dec 22 16:27:26 2003 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 16:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Tue Dec 23 00:56:29 2003 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Tue Dec 23 01:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Dec 23 01:17:13 2003 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Tue Dec 23 01:23:48 2003 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx@linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 09:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Fri Jun 3 17:46:00 2005 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler@evolvica.org || | \ + + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 09:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:46:00 2005 Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 14:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Fri Jun 3 17:46:00 2005 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request@linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler@acm.org || | \ + + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Thu Dec 4 00:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:46:00 2005 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request@linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 11:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Fri Jun 3 17:46:00 2005 Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj@www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 18:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 17:46:00 2005 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 19:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 18:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 20:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 20:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Tue Dec 16 01:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 13:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 19:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 14:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 15:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 15:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 15:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 15:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 16:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 16:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj@www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 12:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 14:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 15:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:01 2005 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 15:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0002.htm From taj at www.linux.org.uk Fri Dec 19 15:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 15:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Sat Dec 20 01:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Sat Dec 20 02:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 18:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 19:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 16:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 16:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Tue Dec 23 00:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Tue Dec 23 01:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:02 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Tue Dec 23 01:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 17:46:03 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx@linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 09:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler@evolvica.org || | \ + + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 09:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 14:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request@linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler@acm.org || | \ + + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Thu Dec 4 00:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request@linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 11:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj@www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 18:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 19:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 18:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 20:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 20:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Tue Dec 16 01:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 13:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 19:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Fri Jun 3 18:08:23 2005 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 14:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 15:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 15:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 15:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 15:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 16:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 16:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj@www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 12:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 14:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 15:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 15:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0003.htm From taj at www.linux.org.uk Fri Dec 19 15:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 15:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Sat Dec 20 01:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Sat Dec 20 02:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:24 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj@www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 18:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj@www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 19:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj@www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 16:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 16:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Tue Dec 23 00:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Tue Dec 23 01:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From jonl at muppetlabs.com Tue Dec 23 01:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri Jun 3 18:08:25 2005 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx@linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0368.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0369.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0370.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0371.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0372.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0373.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0374.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0375.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0376.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0378.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0001.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0002.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0003.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0004.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0005.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0006.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0007.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0008.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0009.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0010.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0001.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0002.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0003.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0004.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0005.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0006.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0007.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0008.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0009.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0010.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0001.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0002.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0003.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0004.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0005.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0006.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0007.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0008.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0009.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0010.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0011.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0012.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0013.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0014.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0015.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0016.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0017.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0018.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0019.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0020.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0021.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0022.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0023.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0024.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0025.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0026.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0027.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0028.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0029.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0030.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj@www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0031.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0032.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0033.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0034.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0035.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0036.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0037.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0038.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0039.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0040.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0041.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0042.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0043.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0044.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0045.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0046.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0047.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0048.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-15, i'm assuming that's what i should be using) fails with: >> >> > >The kernel header warning is harmless in most cases. Sometimes the kernel >headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake >knows what they are doing there. The version test is not intelligent and >really should probably just let things blow up the hard way. > > > >>libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' >>Fatal configuration error. See the libtool docs for more information. >> >>any idea what this means? >> >> > >run 'autogen.sh' cd rxtx-version;./autogen.sh >This will update libtool with your system files. > > > >>the rxtx-2.0-5 version fails in a different way with: >> >>gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. >>-I/usr/java/j2sdk1.4.2_03/include >>-I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE >>-D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c >>-fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo >>/root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character >>/root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': >>/root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" >>/root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character >> >> > >There is a string at 5107 or right near there that needs to escape the new >line. Here is an example: > > "this is a string covering > two lines." > >should be: > > "this is a string covering \ > two lines." > >The problem did not show up in older versions of gcc. > > > >>so i can't build either at the moment, and i guess i'm a little unclear >>on which version i should be using... >> >> > >If you want javax.comm packages you must use 2.0 with Sun's CommAPI for >Solaris. > >If you want source to everything, 2.1 uses package gnu.io to avoid >potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces >it. > >Which you pick is up to you. They use essentially the same code >underneath. > > > >>thanks, >> >> jon >> >>Trent Jarvi wrote: >> >> >> >>>On Mon, 22 Dec 2003, Jonathan Locke wrote: >>> >>> >>> >>> >>> >>>>i'm running rxtx as root, so i don't think there's a permissions problem. >>>>setserial works as you describe. but when i call >>>> >>>> CommPortIdentifier.getPortIdentifiers() >>>> >>>>the enumeration returned has no elements. and then when i try to open the >>>>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >>>> >>>>i know the port is there and working because i can "cat /dev/ttyS1" and >>>>i get >>>>stuff from whatever is hooked up to the port. >>>> >>>>i'm going to try a newer build and see if that helps. when you say >>>>rxtx "scans" >>>>the ports, how does it do that exactly? >>>> >>>> >>>> >>>> >>>> >>>For each port, /dev/ttyS[0-256] rxtx performs the following: >>> >>> 1) check if the port is locked (You can disable this with >>> configure --disable-lockfiles) >>> If the port is locked to not add it to the list of ports. >>> - some want to see this behavior modified. >>> If not, try to lock the port. Again if locking fails do >>> not add the port to the list. >>> 2) open the port. >>> if this failes do not add the port to the list. >>> 3) perform a timed out read. >>> if the read works or times out, add the port to the list. >>> if the read otherwise errors, its not valid so dont add it. >>> >>>Just to let others know whats going on here. Last weekend I finally put >>>together the following cross compilers. >>> >>> i686-pc-freebsd5-gcc* I'm not sure this is the best >>> version choice. >>> sparc-sun-solaris2.6-gcc* should work with 2.6 on. >>> i386-mingw32-gcc* "all w32" >>> i686-pc-linux-gnu-gcc* >>> >>>I'll probably add an arm linux cross compiler too. The above binaries >>>will be in every release from now on. Mac OS X is already in the >>>tarballs. To build a cross compiler you need the native libraries and >>>include files. This puts a limitation on what can be done without >>>licenses. >>> >>>I'm not sure how much time I'm going to have next week but I want to look >>>at the JNI thread issue if nobody gets to it first. We also have some >>>testing going on with 14400 28800 baudrate fixes off the list. >>> >>> >>> >>> >>> >>> >>> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 00:53:48 >>Scanning by http://erado.com >> >> >>_________________________________________________ >>Scanned on 23 Dec 2003 01:00:39 >>Scanning by http://erado.com >>_______________________________________________ >>Rxtx mailing list >>Rxtx at linuxgrrls.org >>http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx >> >> >> > > > _________________________________________________ Scanned on 23 Dec 2003 01:27:57 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:28:08 Scanning by http://erado.com From rummler at evolvica.org Tue Dec 2 02:07:51 2003 From: rummler at evolvica.org (Andreas Rummler) Date: Tue, 02 Dec 2003 10:07:51 +0100 Subject: [Rxtx] Parallel port under win32 Message-ID: <3FCC5667.7030406@evolvica.org> Dear mailing list, after having figured out that Sun's comm-package seems to be rubbish concerning access of the parallel port I stumbled over RXTX. I need to access the parallel port under win32 in EPP-mode and RXTX seems to be able to this (at least in the latest version). I downladed the latest version (2.1.7pre17) and was able to compile it under MinGW32 (after correcting some things in the appropriate Makefiles) - unfortunately it does not work. Compiling using ./configure + make only gives a rxtxSerial.dll, but no rxtxParallel.dll. Nevertheless accessing the ports results in an error: java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver Compiling using the included Makefile.mingw32 creates both dlls, but running a small example program crashes the VM: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x80D7235 Function=JVM_RegisterUnsafeMethods+0x188 Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll Current Java thread: at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) and tell me what I am doing wrong? Or better send me precompiled versions of both dlls? Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:rummler at evolvica.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 02:23:10 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 3 Dec 2003 09:23:10 +0000 (GMT) Subject: [Rxtx] Parallel port under win32 In-Reply-To: <3FCC5667.7030406@evolvica.org> References: <3FCC5667.7030406@evolvica.org> Message-ID: On Tue, 2 Dec 2003, Andreas Rummler wrote: > > Dear mailing list, > > after having figured out that Sun's comm-package seems to be rubbish > concerning access of the parallel port I stumbled over RXTX. > I need to access the parallel port under win32 in EPP-mode and RXTX > seems to be able to this (at least in the latest version). > > I downladed the latest version (2.1.7pre17) and was able to compile > it under MinGW32 (after correcting some things in the appropriate > Makefiles) - unfortunately it does not work. > > Compiling using ./configure + make only gives a rxtxSerial.dll, but > no rxtxParallel.dll. Nevertheless accessing the ports results in an > error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while > loading gnu.io.RXTXCommDriver > > Compiling using the included Makefile.mingw32 creates both dlls, but > running a small example program crashes the VM: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) > occurred at PC=0x80D7235 > Function=JVM_RegisterUnsafeMethods+0x188 > Library=C:\Programme\Java\j2re1.4.2_01\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:57) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:67) > at org.tui.ess.epaa.comm.ParallelTest.main(ParallelTest.java:34) > > > Can anyone help me with that (I'm not a specialist with C/C++ and MinGW32) > and tell me what I am doing wrong? Or better send me precompiled versions > of both dlls? > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz These are cross compiled from CVS source. I gave you an account to use for any code changes you would like to make with a working tree. I would recommend runing make clean between builds. The Makefiles are just enough to get the job done. I tried running the parallel in vmware but was unable to setup a parallel port properly (complained about no IRQ). The library is loading and getting further than it appears you managed. C:\J142\commapi\samples\ParallelBlackBox>java -version java version "1.4.2_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03) Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode) C:\J142\commapi\samples\ParallelBlackBox>ver Windows 98 [Version 4.10.1998] C:\J142\commapi\samples\ParallelBlackBox>java ParallelBlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 No parallel ports found! C:\J142\commapi\samples\ParallelBlackBox> C:\J142\commapi\samples\ParallelBlackBox>java BlackBox Devel Library ========================================= Native lib Version = RXTX-2.1-7pre17 Java lib Version = RXTX-2.1-7pre17 COM3: PORT_OWNED [by this application] COM4: PORT_OWNED [by this application] Closing port 0 (//./COM3) Closing //./COM4 Closing port 0 (//./COM3) Closing //./COM3 C:\J142\commapi\samples\ParallelBlackBox> I hope that helps. From andreas.rummler at tu-ilmenau.de Wed Dec 3 07:47:19 2003 From: andreas.rummler at tu-ilmenau.de (Andreas Rummler) Date: Wed, 03 Dec 2003 15:47:19 +0100 Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <20031203120003.616DD74036@mail.linuxgrrls.org> References: <20031203120003.616DD74036@mail.linuxgrrls.org> Message-ID: <3FCDF777.706@tu-ilmenau.de> rxtx-request at linuxgrrls.org schrieb: > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz Thanks, Trent for your effort. Enumerating the ports in the system works with that version. Unfortunately I needed the functionality of setting the parallel in EPP mode, which does not seem to be supported in this version (at least the app. section in ParallelImp.c from CVS is empty). But I've managed to convice my collegue to support the serial port as well (his hardware sits on the other side of the parallel port). So I will switch to the serial port which will probabaly cause no trouble. Thank you again for your help, Trent! Best regards, Andreas Rummler -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Andreas Rummler + + Technical University of Ilmenau, Germany (__) + + Department Of Electronic Circuits & Systems (oo) + + \/-------\ + + MAIL: mailto:arummler at acm.org || | \ + + MAIL: mailto:andreas.rummler at tu-ilmenau.de ||----|| * + + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ + + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots. So far, the universe is winning." Richard Cook From taj at linuxgrrls.org Wed Dec 3 17:37:13 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 4 Dec 2003 00:37:13 +0000 (GMT) Subject: [Rxtx] Re: Parallel port under win32 In-Reply-To: <3FCDF777.706@tu-ilmenau.de> References: <20031203120003.616DD74036@mail.linuxgrrls.org> <3FCDF777.706@tu-ilmenau.de> Message-ID: On Wed, 3 Dec 2003, Andreas Rummler wrote: > rxtx-request at linuxgrrls.org schrieb: > > > I've placed binaries at ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > > Thanks, Trent for your effort. > > Enumerating the ports in the system works with that version. Unfortunately > I needed the functionality of setting the parallel in EPP mode, which > does not seem to be supported in this version (at least the app. section > in ParallelImp.c from CVS is empty). > I'm a little confused. Did you have a ParallelImp.c that appears to do what you need? I'm having troubles testing the port as mentioned but if there is some code you would like to try that was not in CVS I can certainly put it in. -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.c rxtx-devel/src/ParallelImp.c -bash-2.05b$ diff rxtx-2.1-7pre17/src/ParallelImp.h rxtx-devel/src/ParallelImp.h It looks like CVS had everything. Ah this must be the code in question: JNIEXPORT jboolean JNICALL LPRPort(setLPRMode)(JNIEnv *env, jclass jclazz, jint mode) { switch(mode) { case LPT_MODE_ANY: break; case LPT_MODE_SPP: case LPT_MODE_PS2: case LPT_MODE_EPP: case LPT_MODE_ECP: case LPT_MODE_NIBBLE: default: throw_java_exception( env, UNSUPPORTED_COMM_OPERATION, "nativeSetSerialPortParams", "setLPRMode was unable to proced the requested \ mode" ); } return(JNI_TRUE); } We just need to figure out how to enable EPP in the w32 API and it should work. But this appears to be problematic. http://support.microsoft.com/default.aspx?scid=kb;en-us;125307 Though possible on newer OS's http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_parallelcontroller.asp It would be possible to get EPP/ECP working on XP or 2K but someone would need a machine with valid EPP/ECP ports to get it working. From taj at www.linux.org.uk Sat Dec 13 04:52:38 2003 From: taj at www.linux.org.uk (taj at www.linux.org.uk) Date: Sat, 13 Dec 2003 11:52:38 +0000 (GMT) Subject: [Rxtx] Re: RXTX at Conectiva In-Reply-To: <200312130749.33754.gandhi@quilombodigital.org> Message-ID: On Sat, 13 Dec 2003, Ricardo Andere de Mello wrote: > Hi, > > Sorry for sending this issue directly to you, but nothing I've tried worked. > > -----Environent---- > > java version "1.4.2" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) > Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) > Linux harrison.beatles 2.4.19-1U80_2cl #1 Sex Set 27 03:16:39 BRT 2002 i686 > unknown > Autoconf version 2.13 > automake (GNU automake) 1.4a > Copyright (C) 1999 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > Written by Tom Tromey > ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > Built for i386-conectiva-linux-gnu > ... JVM blows up while trying rxtx's testRead() Hi Ricardo When testRead blows up its usually something not code releated. There have been some changes going on in Linux with respect to glibc and the kernel. The NPTL (new POSIX threading library). I see you are using an older kernel which probabaly does not use these but are using a brand new JVM. I dont know if this is the problem or not. The first thing I would do is recompile rxtx from source on your machine if you have not done so already. I don't know if the new JVM is not backwards compatible or what but rxtx only does a very simple open()/read(). If you still dont have good results after maybe trying older JVM's, please let me know where I can download an ISO of connectiva so I can reproduce this. I'm sure this wont be the last time the problem shows up. -- Trent Jarvi taj at www.linux.org.uk From webmaster at geschwinde.net Sun Dec 14 11:20:59 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Sun, 14 Dec 2003 13:20:59 -0500 Subject: [Rxtx] question about debian Message-ID: <3FDCAA0B.4000400@geschwinde.net> I'm trying to read data from a serial interface ttyS0 I want to work this app with debian woody I wanted to use a serial mouse for the data sending. the easiest way. But when I plug in the mouse it does nothing On redhat9 when I plug and I move it it starts sending data And I'm receiving it Does anayone has a solution about this? Ewald From taj at linuxgrrls.org Sun Dec 14 12:07:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 14 Dec 2003 19:07:54 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDCAA0B.4000400@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: On Sun, 14 Dec 2003, Ewald Geschwinde wrote: > I'm trying to read data from a serial interface ttyS0 > > I want to work this app with debian woody > > I wanted to use a serial mouse for the data sending. > the easiest way. > But when I plug in the mouse it does nothing > > On redhat9 when I plug and I move it it starts sending data > And I'm receiving it > > Does anayone has a solution about this? > Hi Ewald Make sure your kernel is configured to support the serial devices. It is possible serial communication is compiled as a module and has not been installed. You should at least see the following: Sun Dec 14 12:05:09 $ cat /proc/interrupts CPU0 0: 17845281 XT-PIC timer 1: 381535 XT-PIC i8042 2: 0 XT-PIC cascade 3: 11 XT-PIC serial 4: 10 XT-PIC serial ... Make sure rxtx did not have conflicts with the port while opening. It is possible the port is locked by another application. Sun Dec 14 12:07:53 $ fuser /dev/ttyS0 /dev/ttyS0: 20187 Sun Dec 14 12:07:54 $ ps -auwx | grep 20187 jarvi 20187 0.1 27.5 165844 70600 pts/5 S< Dec13 2:06 /usr/lib/vmware/bin/vmware-vmx -@ pipe=/tmp/vmx88fa7fa495f94398;vm=88fa7fa495f94398 /usr/vmtemp/winXP/win2000Pro.cfg Don't be afraid to test with other programs such as kermit, tip, ... Finally, you can examine your serial ports with setserial. From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 13:19:53 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> Message-ID: <3FDDFB49.4090905@geschwinde.net> my problem is the following I have a debian woody system schank:~# cat /proc/interrupts CPU0 0: 336486 XT-PIC timer 1: 158 XT-PIC keyboard 2: 0 XT-PIC cascade 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 14: 1657 XT-PIC ide0 15: 5 XT-PIC ide1 NMI: 0 LOC: 336444 ERR: 43 MIS: 0 this shows the following Do you know what module I must insert to activate the serial communication or in the kernel what things must be enabled this is a new compiled kernel with setserial I get this: schank:~# setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 And testing with kermit, tip Where can I find tip? kermit is a communcation programm?? what is ht easiest and fastest way to test it with kermit? I'm getting crazy with this. btw rxtx is a cool piece of software Regards EWald From taj at linuxgrrls.org Mon Dec 15 13:24:43 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 15 Dec 2003 20:24:43 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDDFB49.4090905@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > my problem is the following > > I have a debian woody system > schank:~# cat /proc/interrupts > CPU0 > 0: 336486 XT-PIC timer > 1: 158 XT-PIC keyboard > 2: 0 XT-PIC cascade > 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 > 14: 1657 XT-PIC ide0 > 15: 5 XT-PIC ide1 > NMI: 0 > LOC: 336444 > ERR: 43 > MIS: 0 > > > this shows the following > > Do you know what module I must insert to activate the serial communication > or in the kernel what things must be enabled > this is a new compiled kernel > > with setserial I get this: > schank:~# setserial /dev/ttyS0 > /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 > > > And testing with kermit, tip > Where can I find tip? > > kermit is a communcation programm?? > what is ht easiest and fastest way to test it with kermit? > > I'm getting crazy with this. > > btw rxtx is a cool piece of software > Regards EWald > With the missing interrupts, I think you just need to ``modprobe serial.'' The modules should be in /lib/modules/'kernel-version'/kernel/drivers/char. Information about the serial port should then be in /proc/tty/ kermit is available at: http://www.columbia.edu/kermit/ There is a GPL version so debian should have a copy. There is a man page with it. It is just a standard program you can test ports with. tip is available on most SysV systems. It may not be available on Linux but the BSD folks may have a tarball that could be used. From webmaster at geschwinde.net Mon Dec 15 13:54:49 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Mon, 15 Dec 2003 15:54:49 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> Message-ID: <3FDE1F99.7050501@geschwinde.net> thanks for the help If I use the astandard kernel I only find generic_serial.o but if iI do modprobe generic_serial and then cat /proc/interrupts it's the same result with my compiled kernel I don't have anything like that I'm now looking at the kernel config and try to enable the serial things. But in my compiled kernel they are enabled. I don't get a solution about this. Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>my problem is the following >> >>I have a debian woody system >>schank:~# cat /proc/interrupts >> CPU0 >> 0: 336486 XT-PIC timer >> 1: 158 XT-PIC keyboard >> 2: 0 XT-PIC cascade >> 9: 2933 XT-PIC usb-uhci, usb-uhci, eth0 >> 14: 1657 XT-PIC ide0 >> 15: 5 XT-PIC ide1 >>NMI: 0 >>LOC: 336444 >>ERR: 43 >>MIS: 0 >> >> >>this shows the following >> >>Do you know what module I must insert to activate the serial communication >>or in the kernel what things must be enabled >>this is a new compiled kernel >> >>with setserial I get this: >>schank:~# setserial /dev/ttyS0 >>/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >> >> >>And testing with kermit, tip >>Where can I find tip? >> >>kermit is a communcation programm?? >>what is ht easiest and fastest way to test it with kermit? >> >>I'm getting crazy with this. >> >>btw rxtx is a cool piece of software >>Regards EWald >> >> >> > >With the missing interrupts, I think you just need to ``modprobe serial.'' >The modules should be in > > /lib/modules/'kernel-version'/kernel/drivers/char. > >Information about the serial port should then be in /proc/tty/ > >kermit is available at: > > http://www.columbia.edu/kermit/ > >There is a GPL version so debian should have a copy. There is a man page >with it. It is just a standard program you can test ports with. > >tip is available on most SysV systems. It may not be available on Linux >but the BSD folks may have a tarball that could be used. >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From taj at linuxgrrls.org Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 01:03:55 +0000 (GMT) Subject: [Rxtx] question about debian In-Reply-To: <3FDE1F99.7050501@geschwinde.net> References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > thanks for the help > > If I use the astandard kernel I only find generic_serial.o > but if iI do modprobe generic_serial and then cat /proc/interrupts > > it's the same result > with my compiled kernel I don't have anything like that > > I'm now looking at the kernel config and try to enable the serial things. > But in my compiled kernel they are enabled. > > I don't get a solution about this. > Ewald Are you sure the ports are enabled in BIOS? Normally kernels have serial support compiled in (not as modules). From webmaster at geschwinde.net Tue Dec 16 06:28:04 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue, 16 Dec 2003 08:28:04 -0500 Subject: [Rxtx] question about debian In-Reply-To: References: <3FDCAA0B.4000400@geschwinde.net> <3FDDFB49.4090905@geschwinde.net> <3FDE1F99.7050501@geschwinde.net> Message-ID: <3FDF0864.4050608@geschwinde.net> Yes I have looked at it the ports are enabled I will try the testing release maybe I have more luck with that The strange thing is when I set up a RH9 on the same machine it runs perfect so it must be an OS problem Ewald Trent Jarvi wrote: >On Mon, 15 Dec 2003, Ewald Geschwinde wrote: > > > >>thanks for the help >> >>If I use the astandard kernel I only find generic_serial.o >>but if iI do modprobe generic_serial and then cat /proc/interrupts >> >>it's the same result >>with my compiled kernel I don't have anything like that >> >>I'm now looking at the kernel config and try to enable the serial things. >>But in my compiled kernel they are enabled. >> >>I don't get a solution about this. >>Ewald >> >> > >Are you sure the ports are enabled in BIOS? Normally kernels have serial >support compiled in (not as modules). >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > > From damien at covey.net.au Wed Dec 17 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Thu, 18 Dec 2003 05:33:29 +1000 Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz Message-ID: <3FE0AF89.3080706@covey.net.au> Hi, When in the process of installing RXTX I think I have found the smallest of typo's in the source of the above package. In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new line in the middle of the string causing it to not compile. I'd post a patch, but this is the most trivial of fixed so I figure someone with CVS commit access can do it. Maybe package 2.0-6 with this fix in it too. That is if what I describe is correct. -- Damien Covey From taj at linuxgrrls.org Tue Dec 16 07:21:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Dec 2003 14:21:55 +0000 (GMT) Subject: [Rxtx] Re: rxtx-2.0-5.tar.gz In-Reply-To: <3FE0AF89.3080706@covey.net.au> References: <3FE0AF89.3080706@covey.net.au> Message-ID: On Thu, 18 Dec 2003, Damien Covey wrote: > Hi, > > When in the process of installing RXTX I think I have found the smallest > of typo's in the source of the above package. > > In the file "rxtx-2.0-5/src/SerialImp.c" line 5106 has an extra new > line in the middle of the string causing it to not compile. I'd post a > patch, but this is the most trivial of fixed so I figure someone with > CVS commit access can do it. Maybe package 2.0-6 with this fix in it > too. That is if what I describe is correct. > Hi Damien This is corrected in the current source ==========================================================================v report_error("check_group_uucp(): error testing lock file \ creation Error details: "); From ari.suutari at syncrontech.com Wed Dec 17 08:00:23 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:00:23 +0200 Subject: [Rxtx] FreeBSD and rxtx Message-ID: <200312171700.23241.ari.suutari@syncrontech.com> Hi, I'm new to rxtx (but not new to java commapi programming). I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to talk to dallas 1-wire devices. Mostly things work ok, except that there are random crashes (which do not occur when using sun's commapi). When running the test program with -Dcheck:jni following messages are displayed: %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 Trying to open /dev/cuaa0 FATAL ERROR in native method: Using JNIEnv in the wrong thread at gnu.io.RXTXPort.nativeDrain(Native Method) at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) at com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) at com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) at com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider.java:377) at AirProto.open(AirProto.java:117) at AirProto.main(AirProto.java:48) Notice the "using JNIEnv in the wrong thread", which means that JNIEnv pointer is being used by a thread which did not obtain it. The rxrx versions I have triead are rxtx-2.1-7pre16 and rxtx-2.1-6. Both seem to have same problem. Another minor thing under FreeBSD is that the lock directory is not /var/spool/uucp, it is /var/spool/lock and the lock file prefix is "LCK.." Ari S. From ari.suutari at syncrontech.com Wed Dec 17 08:25:53 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:25:53 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <200312171725.53649.ari.suutari@syncrontech.com> Hi, Replying to myself: When send_event call in nativeDrain (serialImp.c) is commented out things start to work. So obviously this is the place where JNIEnv pointer is used incorrectly. Ari S. On Wednesday 17 December 2003 17:00, Ari Suutari wrote: > Hi, > > I'm new to rxtx (but not new to java commapi programming). > > I have been trying to use rxtx with FreeBSD jdk 1.4.2 (and 1.4.1) to > talk to dallas 1-wire devices. Mostly things work ok, > except that there are random crashes (which do not occur > when using sun's commapi). > > When running the test program with -Dcheck:jni following > messages are displayed: > > > %/usr/local/bsd-jdk1.4.1/bin/java -Xcheck:jni AirProto /dev/cuaa0 > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.255.028.128 > Trying to open /dev/cuaa0 > FATAL ERROR in native method: Using JNIEnv in the wrong thread > at gnu.io.RXTXPort.nativeDrain(Native Method) > at gnu.io.RXTXPort$SerialOutputStream.flush(RXTXPort.java:1191) > at > com.dalsemi.onewire.adapter.SerialService.flush(SerialService.java:425) > - locked <0x2c2102d0> (a com.dalsemi.onewire.adapter.SerialService) > at com.dalsemi.onewire.adapter.USerialAdapter.uMasterReset(Unknown > Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.uAdapterPresent(Unknown Source) > at > com.dalsemi.onewire.adapter.USerialAdapter.adapterDetected(Unknown Source) > at > com.dalsemi.onewire.OneWireAccessProvider.getAdapter(OneWireAccessProvider. >java:377) at AirProto.open(AirProto.java:117) > at AirProto.main(AirProto.java:48) > > > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > The rxrx versions I have triead are rxtx-2.1-7pre16 > and rxtx-2.1-6. Both seem to have same problem. > > Another minor thing under FreeBSD is that the lock directory > is not /var/spool/uucp, it is /var/spool/lock and the lock file > prefix is "LCK.." > > Ari S. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 10:27:17 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171700.23241.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> Message-ID: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> interesting nativeDrain is called from Java so JVM has to supply that JNIEnv I suppose that JVM has to obtain that value after attaching to the appropriate thread it could be a JVM problem On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > Notice the "using JNIEnv in the wrong thread", which means that > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman From ari.suutari at syncrontech.com Wed Dec 17 08:46:34 2003 From: ari.suutari at syncrontech.com (Ari Suutari) Date: Wed, 17 Dec 2003 17:46:34 +0200 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> Message-ID: <200312171746.34654.ari.suutari@syncrontech.com> Hi, On Wednesday 17 December 2003 17:27, Dmitry Markman wrote: > interesting nativeDrain is called from Java so JVM has to supply that > JNIEnv send_event function does not use the JNIEnv provided by JVM. It uses another JNIEnv value, which has been obtained earlier and is stored in event_info_struct. There seem to be other values in that struct too (jMethodID values) which should be obtained on per-thread basis. > I suppose that JVM has to obtain that value after attaching to the > appropriate thread > it could be a JVM problem No, it is a problem in rxtx code. Some JVMs just tolerate JNI programmin errors more than others. Ari S. > > On Dec 17, 2003, at 10:00 AM, Ari Suutari wrote: > > Notice the "using JNIEnv in the wrong thread", which means that > > JNIEnv pointer is being used by a thread which did not obtain it. > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From dmarkman at mac.com Wed Dec 17 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Dec 2003 11:10:27 -0500 Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <200312171746.34654.ari.suutari@syncrontech.com> References: <200312171700.23241.ari.suutari@syncrontech.com> <7FB27097-30A5-11D8-B493-000A95DA5E9C@mac.com> <200312171746.34654.ari.suutari@syncrontech.com> Message-ID: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> thanks for the small analysis: that's definitely very-very wrong the right approach to store JVM instance in the event_info_struct and after that to obtain JNIEnv in the following fashion: bool wasAttached = false; JNIEnv *env = GetJEnv(jvm,wasAttached); ...... if(wasAttached) jvm->DetachCurrentThread(); JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ JNIEnv *env = NULL; if(vm == NULL) return env; wasAttached = false; jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); if(errGetEnv == JNI_ERR) return NULL; if(errGetEnv == JNI_EDETACHED){ vm->AttachCurrentThread((void **)&env,(void *)NULL); if(env != NULL) wasAttached = true; }else if(errGetEnv != JNI_OK) return NULL; return env; } On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > send_event function does not use the JNIEnv provided > by JVM. It uses another JNIEnv value, which has been > obtained earlier and is stored in event_info_struct. There seem > to be other values in that struct too (jMethodID values) which > should be obtained on per-thread basis. > Dmitry Markman From taj at www.linux.org.uk Wed Dec 17 09:50:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 17 Dec 2003 16:50:50 +0000 (GMT) Subject: [Rxtx] FreeBSD and rxtx In-Reply-To: <8796AD18-30AB-11D8-B493-000A95DA5E9C@mac.com> Message-ID: On Wed, 17 Dec 2003, Dmitry Markman wrote: > thanks for the small analysis: > > that's definitely very-very wrong > > the right approach to store JVM instance in the event_info_struct > and after that to obtain JNIEnv in the following fashion: > > bool wasAttached = false; > JNIEnv *env = GetJEnv(jvm,wasAttached); > > ...... > > if(wasAttached) jvm->DetachCurrentThread(); > > > > JNIEnv *GetJEnv(JavaVM *vm,bool &wasAttached){ > JNIEnv *env = NULL; > if(vm == NULL) return env; > wasAttached = false; > > jint errGetEnv = vm->GetEnv((void **)&env, JNI_VERSION_1_4); > if(errGetEnv == JNI_ERR) return NULL; > if(errGetEnv == JNI_EDETACHED){ > vm->AttachCurrentThread((void **)&env,(void *)NULL); > if(env != NULL) wasAttached = true; > }else if(errGetEnv != JNI_OK) return NULL; > return env; > } > > > > On Dec 17, 2003, at 10:46 AM, Ari Suutari wrote: > > > send_event function does not use the JNIEnv provided > > by JVM. It uses another JNIEnv value, which has been > > obtained earlier and is stored in event_info_struct. There seem > > to be other values in that struct too (jMethodID values) which > > should be obtained on per-thread basis. > > > Dmitry Markman > This would have been my mistake. I think this may be related to a w32 bug that has shown up recently. -- Trent Jarvi taj at www.linux.org.uk From staub at ipf.uni-karlsruhe.de Thu Dec 18 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Thu, 18 Dec 2003 13:21:44 +0100 Subject: [Rxtx] USB Message-ID: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Hi everyone, does anybody know how to use a Keyspan SerialPortHub within RXTX under SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 gives me the correct output. But using RXTX returns incomplete messages(missing characters). I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to the device. Thanks in advance, Guido From taj at www.linux.org.uk Thu Dec 18 07:24:28 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 18 Dec 2003 14:24:28 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE19BD8.8010604@ipf.uni-karlsruhe.de> Message-ID: On Thu, 18 Dec 2003, Guido Staub wrote: > Hi everyone, > > does anybody know how to use a Keyspan SerialPortHub within RXTX under > SuSe9.0? The hub is connected to an USB device. Using cat /dev/ttyUSB0 > gives me the correct output. But using RXTX returns incomplete > messages(missing characters). > I've used ln -s /dev/ttyUSB0 /dev/ttyS99 to create a symbolic link to > the device. > > Thanks in advance, > Guido > Hi Guido Make sure something else is not using the port at the same time. You may have two programs accessing the port and fighting over incomming data. fuser /dev/ttyUSB0 It may also be that the port is not setup correctly. Try setting the port up explicitly. -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Thu Dec 18 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Thu, 18 Dec 2003 15:19:21 -0000 Subject: [Rxtx] rxtx release Message-ID: Hi, Any ideas when a new release will be posted ? thanks Ricardo From staub at ipf.uni-karlsruhe.de Fri Dec 19 08:20:03 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Fri, 19 Dec 2003 16:20:03 +0100 Subject: [Rxtx] USB In-Reply-To: References: Message-ID: <3FE31723.8050908@ipf.uni-karlsruhe.de> Hi, using the fuser command while my app is running returns a couple of PID (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? ttyUSB0 is setup as following: crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 Any ideas? Guido Trent Jarvi schrieb: > >Hi Guido > >Make sure something else is not using the port at the same time. You may >have two programs accessing the port and fighting over incomming data. > > fuser /dev/ttyUSB0 > >It may also be that the port is not setup correctly. Try setting the port >up explicitly. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20031219/8a692afc/attachment-0049.html From taj at www.linux.org.uk Fri Dec 19 08:05:04 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:05:04 +0000 (GMT) Subject: [Rxtx] USB In-Reply-To: <3FE31723.8050908@ipf.uni-karlsruhe.de> Message-ID: On Fri, 19 Dec 2003, Guido Staub wrote: > Hi, > > using the fuser command while my app is running returns a couple of PID > (/dev/ttyUSB0: 2153 2154 2155 2156 2157 2158 2159 2160 > 2161 2162 2163 2165 2166 2167 2169 2170)! Shouldn't it only be one? > ttyUSB0 is setup as following: > crw-rw---- 1 root uucp 188, 0 2003-09-23 20:01 ttyUSB0 > Is it possible your application is opening the port in multiple ports? You might try starting with SimpleRead.java from Sun's CommAPI. If fuser points to nothing after you close the application, you probably have a coding error. You can also view the application with ps auwx |grep $PID. If lock files are enabled, rxtx should avoid conflicts. Symbolic links to device files may cause problems with lock files though. Maybe you have several copies of your application running in the background or in other terminals and you just need to kill -9 $PID. > > Trent Jarvi schrieb: > > > > >Hi Guido > > > >Make sure something else is not using the port at the same time. You may > >have two programs accessing the port and fighting over incomming data. > > > > fuser /dev/ttyUSB0 > > > >It may also be that the port is not setup correctly. Try setting the port > >up explicitly. > > > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Dec 19 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 19 Dec 2003 15:11:50 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Fri Dec 19 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Fri, 19 Dec 2003 17:39:51 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 Message-ID: <3FE3A867.5090701@muppetlabs.com> i just installed rxtx/javacomm on a new dell box we got to replace an older emachine box. the older box was running mandrake 9.1 and many months ago i managed to build rxtx so it would run on it. the new box runs mandrake 9.2 and the rxtx binaries i copied over from the old box cannot find any comm ports even though two comm ports exist. one weird thing about the new box is that serialstat shows only /dev/ttyS1 for some reason, which worries me because i can imagine rxtx or the OS giving up on serial port enumeration if ttyS0 isn't found. anyway, my questions are: - is rxtx generic enough that the build i created on the old box should run on the new one? - how can i tell if i have some non-rxtx problem? - how does rxtx figure out what serial ports exist on my machine? - why doesn't serialstat show the other comm port (linux question, i suppose)? thanks for your time in reading this! jon _________________________________________________ Scanned on 20 Dec 2003 01:39:49 Scanning by http://erado.com _________________________________________________ Scanned on 20 Dec 2003 01:39:50 Scanning by http://erado.com From taj at www.linux.org.uk Fri Dec 19 19:11:40 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 02:11:40 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE3A867.5090701@muppetlabs.com> Message-ID: On Fri, 19 Dec 2003, Jonathan Locke wrote: > > i just installed rxtx/javacomm on a new dell box we got to replace an > older emachine box. the older box was running mandrake 9.1 and many > months ago i managed to build rxtx so it would run on it. the new box > runs mandrake 9.2 and the rxtx binaries i copied over from the old box > cannot find any comm ports even though two comm ports exist. one weird > thing about the new box is that serialstat shows only /dev/ttyS1 for > some reason, which worries me because i can imagine rxtx or the OS > giving up on serial port enumeration if ttyS0 isn't found. anyway, my > questions are: > > - is rxtx generic enough that the build i created on the old box should > run on the new one? > > - how can i tell if i have some non-rxtx problem? > > - how does rxtx figure out what serial ports exist on my machine? > > - why doesn't serialstat show the other comm port (linux question, i > suppose)? > > thanks for your time in reading this! > I suspect you have a lockfile problem. Users should be added to group uucp for lockfiles to work. Root will work by default. RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. I don't think there is any mapping defined for IO addresses or IRQ's for linux in a standard so the port may show up differently under different kernels in /dev. RXTX 'should' work without recompiling. It is always possible that there are incompatabilites in glibc or gcc that will be solved by recompiling. These cases are rare and usually blow up rather than silently exit without finding ports. minicom, kermit and tip (solaris) are typical native programs one can test a port with. setserial should show the valid ports: Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 and invalid ports: Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 /dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 statserial should also behave properly when provided a port: statserial /dev/ttyS0 Device: /dev/ttyS0 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground ... -- Trent Jarvi taj at www.linux.org.uk From ricardo.trindade at emation.pt Sat Dec 20 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 20 Dec 2003 18:54:39 -0000 Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: I'm having a very interesting problem with all previous versions : I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and after about two hours of usage it hangs (the terminal). Using the same command sequence in native windows it doesn't hang, so I'm either looking at rxtx or the rxtx native dll. Do you think any code on rxtx could cause problems after a long time ? I'm successfully using other products from the same company with rxtx. I'll give you some feedback afterwards. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtx release On Thu, 18 Dec 2003, Ricardo Trindade wrote: > Hi, > > Any ideas when a new release will be posted ? > Hi Ricardo We have released a test version but have not heard much feedback. ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz Things I know are being looked at are: rxtx 14400 baud rate appears to be wrong on w32 rxtx write() is blowing up on SMP w32 rxtx is blowing up on freebsd (native thread/JNI var problem). If the above libraries are working for you, They can be formally released. If you need more binaries, just let me know. I've got w32 running here and I think I've got a sparc solaris cross compiler about ready. -- Trent Jarvi taj at www.linux.org.uk _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx From taj at www.linux.org.uk Sat Dec 20 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 20 Dec 2003 19:36:22 +0000 (GMT) Subject: [Rxtx] rxtx release In-Reply-To: Message-ID: On Sat, 20 Dec 2003, Ricardo Trindade wrote: > I'm having a very interesting problem with all previous versions : > > I have a time control terminal from http://www.tmc-srl.it/eng_open.htm, and > after about two hours of usage it hangs (the terminal). Using the same > command sequence in native windows it doesn't hang, so I'm either looking at > rxtx or the rxtx native dll. Do you think any code on rxtx could cause > problems after a long time ? > > I'm successfully using other products from the same company with rxtx. > > I'll give you some feedback afterwards. > There is very little to go on here. It is possible rxtx is hanging on close without an event listener being added. You can edit RXTX*.java and change the debug variables to true to get some sort of log of whats going on and email it to me. If it is javax.comm you are using, start with rxtx-2.0-7pre1. Email me the log off the list and maybe I can spot something. I take it the w32 version is not using rxtx? If they want to send me a copy of the software to reproduce the bug here, I can take a quick look. I'd really just be guessing right now. > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sexta-feira, 19 de Dezembro de 2003 15:12 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtx release > > > On Thu, 18 Dec 2003, Ricardo Trindade wrote: > > > Hi, > > > > Any ideas when a new release will be posted ? > > > > Hi Ricardo > > We have released a test version but have not heard much feedback. > > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17-i386-pc-mingw32.tgz > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.0-7pre1.tar.gz > > Things I know are being looked at are: > > rxtx 14400 baud rate appears to be wrong on w32 > rxtx write() is blowing up on SMP w32 > rxtx is blowing up on freebsd (native thread/JNI var problem). > > If the above libraries are working for you, They can be formally released. > If you need more binaries, just let me know. I've got w32 running here > and I think I've got a sparc solaris cross compiler about ready. > > -- > Trent Jarvi > taj at www.linux.org.uk > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 09:16:57 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 08:16:57 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE718F9.40708@muppetlabs.com> i'm running rxtx as root, so i don't think there's a permissions problem. setserial works as you describe. but when i call CommPortIdentifier.getPortIdentifiers() the enumeration returned has no elements. and then when i try to open the port with getPortIdentifier, i get a java.comm.NoSuchPortException... i know the port is there and working because i can "cat /dev/ttyS1" and i get stuff from whatever is hooked up to the port. i'm going to try a newer build and see if that helps. when you say rxtx "scans" the ports, how does it do that exactly? jon Trent Jarvi wrote: >On Fri, 19 Dec 2003, Jonathan Locke wrote: > > > >>i just installed rxtx/javacomm on a new dell box we got to replace an >>older emachine box. the older box was running mandrake 9.1 and many >>months ago i managed to build rxtx so it would run on it. the new box >>runs mandrake 9.2 and the rxtx binaries i copied over from the old box >>cannot find any comm ports even though two comm ports exist. one weird >>thing about the new box is that serialstat shows only /dev/ttyS1 for >>some reason, which worries me because i can imagine rxtx or the OS >>giving up on serial port enumeration if ttyS0 isn't found. anyway, my >>questions are: >> >> - is rxtx generic enough that the build i created on the old box should >>run on the new one? >> >> - how can i tell if i have some non-rxtx problem? >> >> - how does rxtx figure out what serial ports exist on my machine? >> >> - why doesn't serialstat show the other comm port (linux question, i >>suppose)? >> >>thanks for your time in reading this! >> >> >> > > >I suspect you have a lockfile problem. Users should be added to group >uucp for lockfiles to work. Root will work by default. > >RXTX on Linux scans /dev/ttyS0-256 and /dev/ttySA0-256 when it is loaded. > >I don't think there is any mapping defined for IO addresses or IRQ's for >linux in a standard so the port may show up differently under different >kernels in /dev. > >RXTX 'should' work without recompiling. It is always possible that there >are incompatabilites in glibc or gcc that will be solved by recompiling. >These cases are rare and usually blow up rather than silently exit >without finding ports. > >minicom, kermit and tip (solaris) are typical native programs one can test >a port with. > >setserial should show the valid ports: > >Fri Dec 19 19:09:14 $ setserial /dev/ttyS0 >/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 >Fri Dec 19 19:09:21 $ setserial /dev/ttyS1 >/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 > >and invalid ports: > >Fri Dec 19 19:09:24 $ setserial /dev/ttyS4 >/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0 > >statserial should also behave properly when provided a port: > >statserial /dev/ttyS0 > >Device: /dev/ttyS0 > >Signal Pin Pin Direction Status Full >Name (25) (9) (computer) Name >----- --- --- --------- ------ ----- >FG 1 - - - Frame Ground >... > > > _________________________________________________ Scanned on 22 Dec 2003 16:16:45 Scanning by http://erado.com _________________________________________________ Scanned on 22 Dec 2003 16:16:46 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 09:31:43 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 22 Dec 2003 16:31:43 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE718F9.40708@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > i'm running rxtx as root, so i don't think there's a permissions problem. > setserial works as you describe. but when i call > > CommPortIdentifier.getPortIdentifiers() > > the enumeration returned has no elements. and then when i try to open the > port with getPortIdentifier, i get a java.comm.NoSuchPortException... > > i know the port is there and working because i can "cat /dev/ttyS1" and > i get > stuff from whatever is hooked up to the port. > > i'm going to try a newer build and see if that helps. when you say > rxtx "scans" > the ports, how does it do that exactly? > For each port, /dev/ttyS[0-256] rxtx performs the following: 1) check if the port is locked (You can disable this with configure --disable-lockfiles) If the port is locked to not add it to the list of ports. - some want to see this behavior modified. If not, try to lock the port. Again if locking fails do not add the port to the list. 2) open the port. if this failes do not add the port to the list. 3) perform a timed out read. if the read works or times out, add the port to the list. if the read otherwise errors, its not valid so dont add it. Just to let others know whats going on here. Last weekend I finally put together the following cross compilers. i686-pc-freebsd5-gcc* I'm not sure this is the best version choice. sparc-sun-solaris2.6-gcc* should work with 2.6 on. i386-mingw32-gcc* "all w32" i686-pc-linux-gnu-gcc* I'll probably add an arm linux cross compiler too. The above binaries will be in every release from now on. Mac OS X is already in the tarballs. To build a cross compiler you need the native libraries and include files. This puts a limitation on what can be done without licenses. I'm not sure how much time I'm going to have next week but I want to look at the JNI thread issue if nobody gets to it first. We also have some testing going on with 14400 28800 baudrate fixes off the list. -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 17:54:01 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 16:54:01 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79229.4090905@muppetlabs.com> thanks for the details! that makes pretty good sense to me... although i have no idea why rxtx can't find my serial ports, because that list you gave describes something that rxtx*ought* to be able to do with my system. so i'm now trying to build without locks... btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 baud and enable rtscts hardware handshaking... that wouldn't trip anything up would it? anyway, i'm having little luck here. i'm unable to build because of a version problem with libtool and because my kernel headers maybe don't match my kernel (i find it hard to believe mandrake would ship linux in this state, but that's what configure warns about... so i'm figuring configure is pretty much insane). anyway, my rxtx build (of rxtx-1.4-15, i'm assuming that's what i should be using) fails with: libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' Fatal configuration error. See the libtool docs for more information. any idea what this means? the rxtx-2.0-5 version fails in a different way with: gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. -I/usr/java/j2sdk1.4.2_03/include -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character so i can't build either at the moment, and i guess i'm a little unclear on which version i should be using... thanks, jon Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. >>setserial works as you describe. but when i call >> >> CommPortIdentifier.getPortIdentifiers() >> >>the enumeration returned has no elements. and then when i try to open the >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... >> >>i know the port is there and working because i can "cat /dev/ttyS1" and >>i get >>stuff from whatever is hooked up to the port. >> >>i'm going to try a newer build and see if that helps. when you say >>rxtx "scans" >>the ports, how does it do that exactly? >> >> >> > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > 1) check if the port is locked (You can disable this with > configure --disable-lockfiles) > If the port is locked to not add it to the list of ports. > - some want to see this behavior modified. > If not, try to lock the port. Again if locking fails do > not add the port to the list. > 2) open the port. > if this failes do not add the port to the list. > 3) perform a timed out read. > if the read works or times out, add the port to the list. > if the read otherwise errors, its not valid so dont add it. > >Just to let others know whats going on here. Last weekend I finally put >together the following cross compilers. > > i686-pc-freebsd5-gcc* I'm not sure this is the best > version choice. > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > i386-mingw32-gcc* "all w32" > i686-pc-linux-gnu-gcc* > >I'll probably add an arm linux cross compiler too. The above binaries >will be in every release from now on. Mac OS X is already in the >tarballs. To build a cross compiler you need the native libraries and >include files. This puts a limitation on what can be done without >licenses. > >I'm not sure how much time I'm going to have next week but I want to look >at the JNI thread issue if nobody gets to it first. We also have some >testing going on with 14400 28800 baudrate fixes off the list. > > > > > _________________________________________________ Scanned on 23 Dec 2003 00:53:48 Scanning by http://erado.com _________________________________________________ Scanned on 23 Dec 2003 01:00:39 Scanning by http://erado.com From taj at www.linux.org.uk Mon Dec 22 18:21:31 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 23 Dec 2003 01:21:31 +0000 (GMT) Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: <3FE79229.4090905@muppetlabs.com> Message-ID: On Mon, 22 Dec 2003, Jonathan Locke wrote: > > thanks for the details! that makes pretty good sense to me... although > i have no idea why rxtx can't find my serial ports, because that list > you gave describes something that rxtx*ought* to be able to do with my > system. so i'm now trying to build without locks... > > btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 > baud and enable rtscts hardware handshaking... that wouldn't trip > anything up would it? Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. I think rxtx will restore the previous values but inside CommAPI you need to set things via the API explicitly. > > anyway, i'm having little luck here. i'm unable to build because of a > version problem with libtool and because my kernel headers maybe don't > match my kernel (i find it hard to believe mandrake would ship linux in > this state, but that's what configure warns about... so i'm figuring > configure is pretty much insane). anyway, my rxtx build (of > rxtx-1.4-15, i'm assuming that's what i should be using) fails with: The kernel header warning is harmless in most cases. Sometimes the kernel headers change significantly (ie 2.0 -> 2.4). But you can trust Mandrake knows what they are doing there. The version test is not intelligent and really should probably just let things blow up the hard way. > > libtool: ltconfig version `' does not match ltmain.sh version `1.3.5' > Fatal configuration error. See the libtool docs for more information. > > any idea what this means? run 'autogen.sh' cd rxtx-version;./autogen.sh This will update libtool with your system files. > > the rxtx-2.0-5 version fails in a different way with: > > gcc -I/root/rxtx-2.0-5 -Ii686-pc-linux-gnu -I. > -I/usr/java/j2sdk1.4.2_03/include > -I/usr/java/j2sdk1.4.2_03/include/./linux/ -g -O2 -D_POSIX_SOURCE > -D_BSD_SOURCE -D__need_timespec -c /root/rxtx-2.0-5/src/SerialImp.c > -fPIC -DPIC -o /root/rxtx-2.0-5/i686-pc-linux-gnu/SerialImp.lo > /root/rxtx-2.0-5/src/SerialImp.c:5106:30: missing terminating " character > /root/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': > /root/rxtx-2.0-5/src/SerialImp.c:5107: error: syntax error before "creation" > /root/rxtx-2.0-5/src/SerialImp.c:5107:25: missing terminating " character There is a string at 5107 or right near there that needs to escape the new line. Here is an example: "this is a string covering two lines." should be: "this is a string covering \ two lines." The problem did not show up in older versions of gcc. > > so i can't build either at the moment, and i guess i'm a little unclear > on which version i should be using... If you want javax.comm packages you must use 2.0 with Sun's CommAPI for Solaris. If you want source to everything, 2.1 uses package gnu.io to avoid potential legal issues. 2.1 will not work with Sun's CommAPI; it replaces it. Which you pick is up to you. They use essentially the same code underneath. > > thanks, > > jon > > Trent Jarvi wrote: > > >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > > > > > >>i'm running rxtx as root, so i don't think there's a permissions problem. > >>setserial works as you describe. but when i call > >> > >> CommPortIdentifier.getPortIdentifiers() > >> > >>the enumeration returned has no elements. and then when i try to open the > >>port with getPortIdentifier, i get a java.comm.NoSuchPortException... > >> > >>i know the port is there and working because i can "cat /dev/ttyS1" and > >>i get > >>stuff from whatever is hooked up to the port. > >> > >>i'm going to try a newer build and see if that helps. when you say > >>rxtx "scans" > >>the ports, how does it do that exactly? > >> > >> > >> > > > >For each port, /dev/ttyS[0-256] rxtx performs the following: > > > > 1) check if the port is locked (You can disable this with > > configure --disable-lockfiles) > > If the port is locked to not add it to the list of ports. > > - some want to see this behavior modified. > > If not, try to lock the port. Again if locking fails do > > not add the port to the list. > > 2) open the port. > > if this failes do not add the port to the list. > > 3) perform a timed out read. > > if the read works or times out, add the port to the list. > > if the read otherwise errors, its not valid so dont add it. > > > >Just to let others know whats going on here. Last weekend I finally put > >together the following cross compilers. > > > > i686-pc-freebsd5-gcc* I'm not sure this is the best > > version choice. > > sparc-sun-solaris2.6-gcc* should work with 2.6 on. > > i386-mingw32-gcc* "all w32" > > i686-pc-linux-gnu-gcc* > > > >I'll probably add an arm linux cross compiler too. The above binaries > >will be in every release from now on. Mac OS X is already in the > >tarballs. To build a cross compiler you need the native libraries and > >include files. This puts a limitation on what can be done without > >licenses. > > > >I'm not sure how much time I'm going to have next week but I want to look > >at the JNI thread issue if nobody gets to it first. We also have some > >testing going on with 14400 28800 baudrate fixes off the list. > > > > > > > > > > > > > > _________________________________________________ > Scanned on 23 Dec 2003 00:53:48 > Scanning by http://erado.com > > > _________________________________________________ > Scanned on 23 Dec 2003 01:00:39 > Scanning by http://erado.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From jonl at muppetlabs.com Mon Dec 22 18:28:10 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Mon, 22 Dec 2003 17:28:10 -0800 Subject: [Rxtx] rxtx on mandrake 9.2 In-Reply-To: References: Message-ID: <3FE79A2A.4000005@muppetlabs.com> yes! those look like good leads... thanks very much for all your help! Trent Jarvi wrote: >On Mon, 22 Dec 2003, Jonathan Locke wrote: > > > >>thanks for the details! that makes pretty good sense to me... although >>i have no idea why rxtx can't find my serial ports, because that list >>you gave describes something that rxtx*ought* to be able to do with my >>system. so i'm now trying to build without locks... >> >>btw, i'm doing a couple stty calls in rc.local to set the speed to 2400 >>baud and enable rtscts hardware handshaking... that wouldn't trip >>anything up would it? >> >> > >Nope. And rxtx will _stomp_ (9600 8n1 ...) on the port if it opens it. >I think rxtx will restore the previous values but inside CommAPI you need >to set things via the API explicitly. > > > >>anyway, i'm having little luck here. i'm unable to build because of a >>version problem with libtool and because my kernel headers maybe don't >>match my kernel (i find it hard to believe mandrake would ship linux in >>this state, but that's what configure warns about... so i'm figuring >>configure is pretty much insane). anyway, my rxtx build (of >>rxtx-1.4-1