From webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 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 Mar 14 23:21:48 2006 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 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Tue Mar 14 23:21:48 2006 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 Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 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 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Tue Mar 14 23:21:48 2006 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: Tue Mar 14 23:21:48 2006 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 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 14 23:21:48 2006 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 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:48 2006 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 webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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 Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 18:25:08 2006 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 Mar 28 18:25:08 2006 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 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Tue Mar 28 18:25:08 2006 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 Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:08 2006 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 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Tue Mar 28 18:25:08 2006 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: Tue Mar 28 18:25:08 2006 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 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 18:25:08 2006 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 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:08 2006 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 webmaster at geschwinde.net Mon Dec 15 11:19:53 2003 From: webmaster at geschwinde.net (Ewald Geschwinde) Date: Tue Mar 28 20:17:07 2006 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: Tue Mar 28 20:17:07 2006 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: Tue Mar 28 20:17:07 2006 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 Mon Dec 15 18:03:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Mar 28 20:17:07 2006 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 Mar 28 20:17:07 2006 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 12:33:29 2003 From: damien at covey.net.au (Damien Covey) Date: Tue Mar 28 20:17:07 2006 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 Mar 28 20:17:07 2006 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: Tue Mar 28 20:17:07 2006 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: Tue Mar 28 20:17:07 2006 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 08:27:17 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:07 2006 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: Tue Mar 28 20:17:07 2006 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 09:10:27 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:07 2006 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: Tue Mar 28 20:17:08 2006 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 05:21:44 2003 From: staub at ipf.uni-karlsruhe.de (Guido Staub) Date: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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 08:19:21 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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 08:11:50 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 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 18:39:51 2003 From: jonl at muppetlabs.com (Jonathan Locke) Date: Tue Mar 28 20:17:08 2006 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: Tue Mar 28 20:17:08 2006 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 11:54:39 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Tue Mar 28 20:17:08 2006 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 12:36:22 2003 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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-0050.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 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-0051.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 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-0052.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 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-0053.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 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-0054.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 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-0055.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 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-0056.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 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-0057.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 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-0058.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 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-0059.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 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-0060.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 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-0061.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 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-0062.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 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-0063.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 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-0064.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 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-0065.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 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-0066.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 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-0067.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 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-0068.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 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-0069.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 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-0070.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 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-0071.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 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-0072.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 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-0073.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 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-0074.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 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-0075.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 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-0076.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 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-0077.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 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-0078.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 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-0079.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 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-0080.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 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-0081.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 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-0082.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 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-0083.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 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-0084.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 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-0085.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 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-0086.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 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-0087.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 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-0088.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 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-0089.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 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-0090.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 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-0091.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 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-0092.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 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-0093.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 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-0094.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 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-0095.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 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-0096.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 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-0097.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 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-0098.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 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-0099.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 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-0100.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 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-0101.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 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-0102.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 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-0103.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 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-0104.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 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-0105.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 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-0106.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 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-0107.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 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-0108.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 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-0109.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 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-0110.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 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-0111.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 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-0112.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 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-0113.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 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-0114.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 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-0115.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 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-0116.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 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-0117.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 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-0118.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 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-0119.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 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-0120.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 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-0121.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 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-0122.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 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-0123.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 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-0124.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 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-0125.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 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-0126.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 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-0127.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 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-0128.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 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-0129.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 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-0130.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 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-0131.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 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-0132.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 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-0133.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 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-0134.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 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-0135.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 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-0136.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 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-0137.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 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-0138.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 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-0139.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 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-0140.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 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-0141.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 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-0142.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 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-0143.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 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-0144.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 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-0145.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 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-0146.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 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-0147.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 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-0148.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 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-0149.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 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-0150.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 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-0151.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 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-0152.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 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-0153.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 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-0154.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 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-0155.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 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-0156.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 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-0157.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 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-0158.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 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-0159.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 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-0160.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 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-0161.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 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-0162.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 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-0163.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 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-0164.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 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-0165.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 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-0166.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 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-0167.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 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-0168.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 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-0169.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 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-0170.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 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-0171.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 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-0172.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 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-0173.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 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-0174.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 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-0175.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 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, Gui